package com.ctms.system.service.impl;

import com.ctms.system.dao.TeacherMapper;
import com.ctms.system.domain.CourseScoreDO;
import com.ctms.system.domain.UserDO;
import com.ctms.system.domain.UserRoleDO;
import com.ctms.system.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TeacherServiceImpl implements TeacherService {
    @Autowired
    TeacherMapper teacherMapper;

    @Override
    public List<UserDO> selectAllTeacher(Map<String, Object> params) {
        return teacherMapper.selectAllTeacher(params);
    }

    @Override
    public int count(Map<String, Object> params) {
        return teacherMapper.count(params);
    }

    @Override
    public int insertTeacher(UserDO userDO) {
        return teacherMapper.insertTeacher(userDO);
    }

    @Override
    public int insertUserRole(UserRoleDO userRoleDO) {
        return teacherMapper.insertUserRole(userRoleDO);
    }

    @Override
    public int delete(Integer id) {
        return teacherMapper.deleteTeacher(id);
    }

    @Override
    public int deleteUserRole(Integer userId) {
        return teacherMapper.deleteUserRole(userId);
    }

    @Override
    public UserDO selectById(Integer id) {
        return teacherMapper.selectById(id);
    }

    @Override
    public int updateTeacher(UserDO userDO) {
        return teacherMapper.updateTeacher(userDO);
    }

    @Override
    public int updateCollege(UserDO userDO) {
        return teacherMapper.updateCollege(userDO);
    }

    @Override
    public int updateCompany(UserDO userDO) {
        return teacherMapper.updateCompany(userDO);
    }

    @Override
    public List<UserDO> selectTeacherStu(Map<String, Object> param) {
        return teacherMapper.selectTeacherStu(param);
    }

    @Override
    public int countTeacherStu(Map<String, Object> param) {
        return teacherMapper.countTeacherStu(param);
    }

    @Override
    public List<UserDO> exportMyStu(Integer loginId) {
        return teacherMapper.exportMyStu(loginId);
    }

    @Override
    public List<UserDO> exportMyStuByClass(Integer loginId, String condition) {
        return teacherMapper.exportMyStuByClass(loginId,condition);
    }

    @Override
    public List<UserDO> exportMyStuByCourse(Integer loginId, String condition) {
        return teacherMapper.exportMyStuByCourse(loginId,condition);
    }

    @Override
    public CourseScoreDO selectScoreByCidUserId(Integer courseId, Integer userId) {
        return teacherMapper.selectScoreByCidUserId(courseId, userId);
    }
}
